﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WebControlApp
{
    public partial class Controler : Form
    {
        //public JoystickInterface.Joystick jstForm2;
        public string[] sticks;
        public string selectedStick;

        public Main frm1;

        public Controler()
        {
            InitializeComponent();
            selectedStick = null;
        }

        private void Form2_Load(object sender, EventArgs e)
        {
           
        }

        private void button2_Click(object sender, EventArgs e)
        {
            foreach(string s in sticks){
                listBox1.Items.Add(s);
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (listBox1.SelectedIndex >= 0)
            {
                //selectedStick = listBox1.SelectedItem.ToString();
                //toolStripStatusLabel2.Text = selectedStick;
                //((Main)frm1).currentStick = selectedStick;
                //((Main)frm1).jstForm1.AcquireJoystick(selectedStick);
            }
        }


        
    }
}
